package com.itheima.demo;

import com.github.pagehelper.PageInfo;
import com.itheima.pojo.UserInfo;
import com.itheima.service.UserInfoService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.List;

public class Demo2 {
    public static void main(String[] args) {
        ApplicationContext ac = new ClassPathXmlApplicationContext("spring.xml");
        UserInfoService userInfoService = ac.getBean(UserInfoService.class);

        /*List<UserInfo>userInfoList = userInfoService.findAll();
        PageInfo<UserInfo> pageInfo=new PageInfo<UserInfo>(userInfoList);*/
        UserInfo userInfo = userInfoService.findOne(1);
        System.out.println(userInfo);
    }
}
